package com.cj.models;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;

@Data
@TableName(value = "books")
@JsonNaming(PropertyNamingStrategy.UpperCamelCaseStrategy.class)
public class BookModel {
    @TableId(value = "book_id",type = IdType.AUTO)
    private int bookId;

    @TableField(value = "book_name")
    private String bookName;

    @JsonProperty(value = "price1")
    @TableField(value = "book_price1")
    private float bookPrice1;//价格
    @TableField(value = "book_kind")
    private int bookKind;
    @TableField(value = "kind_name",select = false)
    private String kindName;

    public BookModel(int book_id, String book_name) {
        this.bookId = book_id;
        this.bookName = book_name;
    }


}
